package org.xukai.common.spel;


import java.util.ArrayList;
import java.util.List;

/**
 * Created by ZuoYun on 2014/8/29.
 * Time: 20:38
 * Information:
 */
// TODO 重构ComboFieldConfig,使用组合模式进行解析
public class ComboFieldConfig<T> extends FieldConfig<T> {

    /**
	 * 
	 */
	private static final long serialVersionUID = 4012935599720816436L;
	List<ComboDetailFiled<?>> comboFieldConfigs = new ArrayList<ComboDetailFiled<?>>();
	
	/**
	 * 连接字符串，如果为空，则不添加连接字符串
	 */
	private String joinString;


    public ComboFieldConfig(Class<T> domainClazz, String name, String key) {
        super(domainClazz, name, key, "");
    }

    public List<ComboDetailFiled<?>> getComboFieldConfigs() {
        return comboFieldConfigs;
    }

    public ComboFieldConfig<T> add(ComboDetailFiled<?> comboDetailFiled) {
        this.comboFieldConfigs.add(comboDetailFiled);
        return this;
    }

	public String getJoinString() {
		return joinString;
	}

	public ComboFieldConfig<T> setJoinString(String joinString) {
		this.joinString = joinString;
		return this;
	}

}

